package cn.uniquesoft.service.impl;

import org.springframework.stereotype.Service;

import cn.uniquesoft.mapper.UserMapper;
import cn.uniquesoft.service.IUserService;
import cn.uniquesoft.service.base.BaseServiceImpl;
import cn.uniquesoft.vo.UserVO;

import java.util.List;

@Service
public class UserServiceImpl extends BaseServiceImpl<UserVO> implements IUserService {

	private UserMapper userMapper;

	public UserServiceImpl(UserMapper userMapper) {
		super();
		this.userMapper = userMapper;
		this.baseMapper = userMapper;
	}

	@Override
	public UserVO getUserByName(String cname) {
		return this.userMapper.getUserByName(cname);
	}

	@Override
	public int resetPwd(UserVO userVO) {
		// TODO Auto-generated method stub
		return this.userMapper.resetPwd(userVO);
	}

	@Override
	public int updateHeadUrl(String cportrait, int iid) {
		UserVO userVO = new UserVO();
		userVO.setCportrait(cportrait);
		userVO.setIid(iid);
		return this.userMapper.updateHeadUrl(userVO);
	}

	@Override
	public List<UserVO> findIn(String ids) {
		return this.userMapper.findIn(ids);
	}


}
